/*
 * GeoVISTA Center (Penn State, Dept. of Geography)
 * Copyright (c), 2003-2011,  Jin Chen and Alan M. MacEachren, GeoVISTA Center, Penn State University
 * All Rights Researved.
 *
 * This library is developed and distributed for free usage,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * You can redistribute and/or modify it under the terms of the
 * Simplified BSD License
 *
 *
 *
 *
 *
 *
 *
 *
 * @author: jin Chen 
 * @date: Apr 19, 2004$
 * @version: 1.0
 */
package edu.psu.geovista.app.pcp.toolkits.gui.text;

import javax.swing.*;
import java.awt.event.*;

public class InputDetectTextField extends JTextField{
    public InputDetectTextField() {
        this.addInputMethodListener(new InputMethodListener() {
            public void caretPositionChanged(InputMethodEvent event) {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            public void inputMethodTextChanged(InputMethodEvent event) {
                //To change body of implemented methods use File | Settings | File Templates.
                System.out.println("input");
            }
        });

        this.addActionListener(new ActionListener(){
            public void actionPerformed(ActionEvent e) {
                //To change body of implemented methods use File | Settings | File Templates.
                System.out.println("act");
            }

        });
        this.addKeyListener(new KeyListener(){
            public void keyPressed(KeyEvent e) {
                //To change body of implemented methods use File | Settings | File Templates.
                 System.out.println("key");
            }

            public void keyReleased(KeyEvent e) {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            public void keyTyped(KeyEvent e) {
               System.out.println("key");
            }

        }) ;

    }
    
}
